//
//  UIButton+Extension.m
//  haozhoudao
//
//  Created by Bingo on 15/11/27.
//  Copyright © 2015年 quan. All rights reserved.
//

#import "UIButton+Extension.h"

@implementation UIButton (Extension)

//设置按钮参数
+ (UIButton *)buttonWithImage:(NSString *)imageName title:(NSString *)title font:(CGFloat )font setColorRed:(CGFloat) red green:(CGFloat)green blue:(CGFloat)blue{

    UIButton *Button = [[UIButton alloc] init];
    [Button setBackgroundImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    [Button setTitle:title forState:UIControlStateNormal];
    [Button setTitleColor:[UIColor colorWithRed:red green:green blue:blue alpha:1.000] forState:UIControlStateNormal];
    Button.titleLabel.font = [UIFont systemFontOfSize:font];
    [Button sizeToFit];
    return Button;

}
@end
